home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / CrackMe-id14-lu48-en.txt < prev    next >
Encoding:
Text File  |  1999-06-18  |  3.7 KB  |  100 lines

  1.             ------------------------------
  2.             CrackMe [id:14] coded by tC...
  3.             Tutorial by Lucifer48, 17 june
  4.             ------------------------------
  5.  
  6. Protection: Name/Serial (Single licence / Worldwide license)
  7.  
  8. ===============
  9. 1. INTRODUCTION
  10. ===============
  11.  
  12. A bpx hmemcpy allow us to enter into the code of the program (written in delphi).
  13.  
  14. XXXX:0043F6B9  CALL 00421960          ;we exit from here
  15. XXXX:0043F6BE  MOV  EAX,[EBP-08]      ;d EAX: my name
  16. XXXX:0043F6C1  CALL 00403A1C          ;gives the length of the name (in eax)
  17. XXXX:0043F6C6  CMP  EAX,03
  18. XXXX:0043F6C9  JL   0043F841          ;the name must be greater than 3 chars
  19.  
  20. we continue:
  21.  
  22. XXXX:0043F6F5  MOV  EAX,[EBP-08]      ;d EAX: my dummy serial
  23. XXXX:0043F6F8  CALL 00403A1C          ;gives the length of the name (in eax)
  24. XXXX:0043F6FD  CMP  ESI,EAX           ;ESI=length of name / EAX=length of serial
  25. XXXX:0043F6FF  JNZ  0043F841          ;must have same length for the name and for the serial
  26. ...
  27. delphi's code... not very interesting...
  28. we arrive here:
  29.  
  30. XXXX:0043F7BE  CALL [EDX+00000B8]     ;<=> MOV AL,[EAX+000001F1]
  31. XXXX:0043F7C4  TEST AL,AL             ;'Single licence' or 'Worldwide license'
  32. XXXX:0043F7C6  JZ   0043F7CF          ;--\
  33. XXXX:0043F7C8  CALL 0043F58C          ;  |  ---\
  34. XXXX:0043F7CD  JMP  0043F7D4          ;  |     |
  35. XXXX:0043F7CF  CALL 0043F5F0          ;<-/     |
  36. XXXX:0043F7D4  CMP  DWORD PTR [0044192C],00  <-/
  37. XXXX:0043F7DB  JNZ  0043F80A
  38.  
  39. We recognize here, the protection scheme, if we check Single licence' (AL=01), we go in the
  40. call 0043F58C, if we check 'Worldwide license' (AL=00), we go in the call 0043F5F0.
  41. In both cases, we must have [0044192C]=0.
  42.  
  43. =================================
  44. 2. SINGLE LICENCE (call 0043F58C)
  45. =================================
  46.  
  47. The most important thing, in this call is this main loop:
  48.  
  49. XXXX:0043F5CC  MOV  EDX,0044182C     ;see remark (below)
  50. XXXX:0043F5D1  MOV  ESI,[EAX]        ;*eax : a char of the serial
  51. XXXX:0043F5D3  SUB  ESI,[EDX]        ;*edx : a char of the name
  52. XXXX:0043F5D5  JZ   0043F5DD
  53. XXXX:0043F5D7  ADD  [0044192C],ECX   ;don't forget that we must have [0044192C]=0 at the end
  54. XXXX:0043F5DD  INC  ECX
  55. XXXX:0043F5DE  ADD  EDX,04           ;next char
  56. XXXX:0043F5E1  ADD  EAX,04           ;next char
  57. XXXX:0043F5E4  DEC  EBX              ;count -1
  58. XXXX:0043F5E5  JNZ  0043F5D1         ;LOOP
  59.  
  60. Remark: this is what we see in 0044182C (it's my name!)
  61. -----CM_ID14!BSS+082C-----------------------------------------------PROT---(0)--
  62. XXXX:0044182C 4C 00 00 00 75 00 00 00-63 00 00 00 69 00 00 00  L...u...c...i...
  63. XXXX:0044183C 66 00 00 00 65 00 00 00-72 00 00 00 34 00 00 00  f...e...r...4...
  64. XXXX:0044184C 38 00 00 00                                      8...
  65. --------------------------------------------------------------------------------
  66. The serial has the same disposition, but it is reversed.
  67.  
  68.   Name/ Lucifer48
  69. RegNo./ 84reficuL
  70.  
  71. ====================================
  72. 3. WORLDWIDE LICENCE (call 0043F5F0)
  73. ====================================
  74.  
  75. As above, still a loop, in this call.
  76.  
  77. XXXX:0043F631  MOV  EDX,0044182C
  78. XXXX:0043F636  MOV  ESI,[EDX]       ;my name
  79. XXXX:0043F638  ADD  ESI,08
  80. XXXX:0043F63B  MOV  EDI,[EAX]       ;my dummy serial (in reverse order)
  81. XXXX:0043F63D  SUB  EDI,ESI
  82. XXXX:0043F63F  JZ   0043F647
  83. XXXX:0043F641  ADD  [0044192C],ECX
  84. XXXX:0043F647  INC  ECX
  85. XXXX:0043F648  ADD  EDX,04          ;next char
  86. XXXX:0043F64B  ADD  EAX,04          ;next char
  87. XXXX:0043F64E  DEC  EBX             ;count -1
  88. XXXX:0043F64F  JNZ  0043F636        ;LOOP
  89.  
  90. It looks like the previous loop... No need to tell more, the code is trivial.
  91.  
  92.   Name/ Lucifer48
  93. RegNo./ @<zmnqk}T
  94.  
  95.  
  96. Greetings Goes to: Torn@do, Volatility, tC, Eternal Bliss, ACiD BuRn,
  97.                    and good french crackers.
  98.  
  99. Lucifer48
  100.